#-----------------------------
# Global configuration file for mpv media player
#-

#-----------------------------
# Documentation: https://mpv.io/manual/master/
#-

#-----------------------------
# use CLI options/flags in this config file
#-----------------------------
# option            |  Config file entry
# --flag            |  flag
# -opt val          |  opt=val
# --opt=val         |  opt=val
# -opt "has spaces" |  opt="has spaces"

#------------------------------
# GUI
#-
no-border # no window title bar

# set the initial window size of mpv
# geometry=50%+10+10
geometry=50%

# Disable auto-loading of subtitles if they exist
autoload-files=no

# Force GPU accelerated video output by default
# NOTE: TODO: ipatch, this is OS specific, ie. GNU+Linux and macos
vo=gpu 

# Enable hardware decoding for all codecs
# hwdec=videotoolbox # macos specific
hwdec=nvdec # gnu+linux

# Create a log file for printing diagnostic info about mpv launch and playback
# log-file=~/logs/mpv/mpv.log

# Keep mpv open after video finishes playing
keep-open=yes

# Resume playback position from last played position if video did not finish playing
resume-playback
save-position-on-quit


# Bind a UNIX style socket to mpv so I can interact with mpv using a JSON IPC via a CLI
## NOTE: `ps aux` | grep mpv will not show the path to the socket in the cli args as it is defined within this configuration file
# input-ipc-server=/Users/capin/ltmp/mpvsocket
input-ipc-server=/tmp/mpvsocket

###
# EXP
#
# NOTE: TODO: ipatch, increase cache > 150MB default
# NOTE: cache-on-disk is presently broken
# https://github.com/mpv-player/mpv/issues/11097
cache=yes
cache-on-disk=yes
cache-dir=/home/capin/tmp/mpv
demuxer-max-bytes=20000MiB

